﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="AddOrganization.aspx.cs" Inherits="SD.UI.AddOrganization" Title="Untitled Page" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Add Orgnization</title>

    <script src="../Js/Message.js" type="text/javascript"></script>

    <script type="text/javascript">
            function ShowLeadContacts()  
              {  
               window.open('LeadContacts.aspx','_blank','scrollbars=1, width=800px,height=500px');  
              }
              function ShowSearchAddress()  
              {  
               window.open('SearchAddress.aspx','_blank','scrollbars=1, width=800px,height=500px');  
              }
              function ShowSearchBussinessType()  
              {  
               window.open('SearchBussinessType.aspx','_blank','scrollbars=1, width=800px,height=500px');  
              }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        <table width="100%">
            <tr>
                <td colspan="2">
                    <div>
                        <h1>
                            Organization List
                        </h1>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div style="float: right">
                        <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />
                        <asp:Button ID="btnBack" runat="server" Text="Back" OnClick="btnBack_Click" CausesValidation="False" />
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div>
                        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                        </asp:ToolkitScriptManager>
                        <div>
                            <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
                                OnActiveTabChanged="TabContainer1_ActiveTabChanged">
                                <asp:TabPanel ID="tabsDetail1" runat="server" HeaderText="Detail 1">
                                    <ContentTemplate>
                                        <div>
                                            <asp:Panel ID="PanelDetails1" runat="server" Width="1180px">
                                                <div>
                                                    <table width="100%">
                                                        <tr>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbOrgName" runat="server" Text="Organization Name"></asp:Label><asp:Label
                                                                        ID="lbValidOrgName" runat="server" ForeColor="Red" Text="*"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:TextBox ID="tbxOrgName" runat="server" Width="250px"></asp:TextBox><asp:RequiredFieldValidator
                                                                        ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbxOrgName" ErrorMessage="Please input the organization name."> * </asp:RequiredFieldValidator></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbPreOrganization" runat="server" Text="Preferred Organization"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:CheckBox ID="chkPreOrganization" runat="server" AutoPostBack="True" /></div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td rowspan="2">
                                                                <div>
                                                                    <asp:Label ID="lbOrgShortDescription" runat="server" Text="Organization Short Description"></asp:Label><asp:Label
                                                                        ID="lbValidOrgShortDes" runat="server" ForeColor="Red" Text="*"></asp:Label></div>
                                                            </td>
                                                            <td rowspan="2">
                                                                <div>
                                                                    <asp:TextBox ID="tbxOrgShortDes" runat="server" TextMode="MultiLine" Width="250px"></asp:TextBox><asp:RequiredFieldValidator
                                                                        ID="RequiredFieldValidator2" runat="server" ControlToValidate="tbxOrgShortDes"
                                                                        ErrorMessage="Please input the oarganization short description."> * </asp:RequiredFieldValidator></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbExpOfInterest" runat="server" Text="Expression of Interest"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:CheckBox ID="chkExpOfInterest" runat="server" OnCheckedChanged="chkExpOfInterest_CheckedChanged"
                                                                        AutoPostBack="True" /></div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lbTypeOfBussiness" runat="server" Text="Type Of Bussiness"></asp:Label><asp:Label
                                                                    ID="lbValidTypeOfBus" runat="server" ForeColor="Red" Text="*"></asp:Label>
                                                            </td>
                                                            <td>
                                                                <div class="navi">
                                                                    <div>
                                                                        <asp:TextBox ID="tbxTypeOfBussiness" runat="server" Enabled="False" Width="200px"
                                                                            AutoPostBack="True"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator6"
                                                                                runat="server" ControlToValidate="tbxTypeOfBussiness" ErrorMessage="Please input the type of bussiness."> * </asp:RequiredFieldValidator></div>
                                                                    <div onclick="ShowSearchBussinessType()">
                                                                        <asp:LinkButton ID="linkTypeOfBussiness" runat="server" Text="Lookup"></asp:LinkButton></div>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbLeadContact" runat="server" Text="Lead Contact"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div class="navi">
                                                                    <div>
                                                                        <asp:TextBox ID="tbxLeadContact" runat="server" Width="200px" ReadOnly="True" Enabled="False"
                                                                            AutoPostBack="True"></asp:TextBox></div>
                                                                    <div onclick="ShowLeadContacts()">
                                                                        <asp:LinkButton ID="linkLookup" runat="server" Text="Lookup"></asp:LinkButton></div>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbSICCode" runat="server" Text="SIC Code"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:TextBox ID="tbxSICCode" runat="server" Enabled="False" Width="250px" AutoPostBack="True"></asp:TextBox></div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbAddressLine1" runat="server" Text="Address Line 1"></asp:Label><asp:Label
                                                                        ID="lbValidAddLine1" runat="server" ForeColor="Red" Text="*"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:TextBox ID="tbxAddressLine1" runat="server" Width="250px" Enabled="False" AutoPostBack="True"></asp:TextBox><asp:RequiredFieldValidator
                                                                        ID="RequiredFieldValidator3" runat="server" ControlToValidate="tbxAddressLine1"
                                                                        ErrorMessage="Please input the address line 1."> * </asp:RequiredFieldValidator></div>
                                                            </td>
                                                            <td rowspan="2">
                                                                <div>
                                                                    <asp:Label ID="lbOrgFullDescription" runat="server" Text="Organization Full Description"></asp:Label></div>
                                                            </td>
                                                            <td rowspan="2">
                                                                <div>
                                                                    <asp:TextBox ID="tbxOrgFullDescription" runat="server" TextMode="MultiLine" Width="250px"></asp:TextBox></div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbAddressLine2" runat="server" Text="Address Line 2"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:TextBox ID="tbxAddressLine2" runat="server" Width="250px" Enabled="False" AutoPostBack="True"></asp:TextBox></div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbAddressLine3" runat="server" Text="Address Line 3"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:TextBox ID="tbxAddressLine3" runat="server" Width="250px" Enabled="False" AutoPostBack="True"></asp:TextBox></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbPhoneNumber" runat="server" Text="Phone Number"></asp:Label><asp:Label
                                                                        ID="lbValidPhoneNumber" runat="server" ForeColor="Red" Text="*"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:TextBox ID="tbxPhoneNumber" runat="server" Width="250px"></asp:TextBox><asp:RequiredFieldValidator
                                                                        ID="RequiredFieldValidator5" runat="server" ControlToValidate="tbxPhoneNumber"
                                                                        ErrorMessage="Please input the phone number."> * </asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                                            ID="RegularExpressionValidator1" runat="server" ControlToValidate="tbxFax" Display="Dynamic"
                                                                            ErrorMessage="Invalid Fax format." ValidationExpression="\d{10}">*</asp:RegularExpressionValidator></div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbPostcode" runat="server" Text="Postcode"></asp:Label><asp:Label
                                                                        ID="lbValidPostcode" runat="server" ForeColor="Red" Text="*"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div class="navi">
                                                                    <div>
                                                                        <asp:TextBox ID="tbxPostcode" runat="server" Enabled="False" Width="200px" AutoPostBack="True"></asp:TextBox><asp:RequiredFieldValidator
                                                                            ID="RequiredFieldValidator4" runat="server" ControlToValidate="tbxPostcode" ErrorMessage="Please input the postcode."> * </asp:RequiredFieldValidator></div>
                                                                    <div onclick="ShowSearchAddress()">
                                                                        <asp:LinkButton ID="linkPostcode" runat="server" Text="Lookup"></asp:LinkButton></div>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbFax" runat="server" Text="Fax"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:TextBox ID="tbxFax" runat="server" Width="250px"></asp:TextBox><asp:RegularExpressionValidator
                                                                        ID="RegularExpressionValidator4" runat="server" ControlToValidate="tbxFax" Display="Dynamic"
                                                                        ErrorMessage="Invalid fax format." ValidationExpression="\d{10}">*</asp:RegularExpressionValidator></div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbCity" runat="server" Text="City/Town"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:TextBox ID="tbxCityTown" runat="server" Width="250px" Enabled="False" AutoPostBack="True"></asp:TextBox></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbEmail" runat="server" Text="Email"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="tbxEmail" runat="server" Width="250px"></asp:TextBox><asp:RegularExpressionValidator
                                                                    ID="RegularExpressionValidator2" runat="server" ControlToValidate="tbxEmail"
                                                                    ErrorMessage="Invalid email format." ValidationExpression="^[a-z][a-z|0-9|]*([_][a-z|0-9]+)*([.][a-z|0-9]+([_][a-z|0-9]+)*)?@[a-z][a-z|0-9|]*\.([a-z][a-z|0-9]*(\.[a-z][a-z|0-9]*)?)$">*</asp:RegularExpressionValidator>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbCounty" runat="server" Text="County"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:TextBox ID="tbxCounty" runat="server" Width="250px" Enabled="False" AutoPostBack="True"></asp:TextBox></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbWebAddress" runat="server" Text="Web Address"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:TextBox ID="tbxWebAddress" runat="server" Width="250px"></asp:TextBox><asp:RegularExpressionValidator
                                                                        ID="RegularExpressionValidator3" runat="server" ControlToValidate="tbxWebAddress"
                                                                        ErrorMessage="Invalid WebAddress format." ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?">*</asp:RegularExpressionValidator></div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbNationCountry" runat="server" Text="Nation/Country"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:TextBox ID="tbxNationCountry" runat="server" Width="250px" ReadOnly="True" Enabled="False"
                                                                        AutoPostBack="True"></asp:TextBox></div>
                                                                <td>
                                                                    <div>
                                                                        <asp:Label ID="lbCharityNumber" runat="server" Text="Charity Number"></asp:Label></div>
                                                                </td>
                                                                <td>
                                                                    <div>
                                                                        <asp:TextBox ID="tbxCharityNumber" runat="server" Width="250px"></asp:TextBox></div>
                                                                </td>
                                                        </tr>
                                                        </tr><tr>
                                                            <td>
                                                            </td>
                                                            <td>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:Label ID="lbCompanyNumber" runat="server" Text="Company Number"></asp:Label></div>
                                                            </td>
                                                            <td>
                                                                <div>
                                                                    <asp:TextBox ID="tbxCompanyNumber" runat="server" Width="250px"></asp:TextBox></div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="3">
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </asp:Panel>
                                        </div>
                                    
                                    
                                </ContentTemplate>
                                
</asp:TabPanel>
                                <asp:TabPanel ID="tabsDetail2" runat="server" HeaderText="Detail 2" Width="1180px">
                                    <HeaderTemplate>
                                        Detail 2
                                </HeaderTemplate>
                                    
<ContentTemplate>
                                        <div>
                                            <table width="100%">
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <asp:Label ID="lbOrgSpecicalism" runat="server" Text="Organization Specicalism"></asp:Label></div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:Panel ID="pn1" runat="server" ScrollBars="Vertical" BorderColor="Gray" BorderStyle="Solid"
                                                                BorderWidth="1px" Width="200px" Height="100px">
                                                                <asp:CheckBoxList ID="ckbOrgSpecicalism" runat="server" Height="50px" Width="200px">
                                                                </asp:CheckBoxList>
                                                            </asp:Panel>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:Label ID="lbSerPerCirCapabilities" runat="server" Text="Services Peronal Circumstances Capabilities"></asp:Label></div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:Panel ID="Panel1" runat="server" ScrollBars="Vertical" BorderColor="Gray" BorderStyle="Solid"
                                                                BorderWidth="1px" Width="200px" Height="100px">
                                                                <asp:CheckBoxList ID="clistSerPerCirCapabilities" runat="server" Height="50px" Width="200px">
                                                                </asp:CheckBoxList>
                                                            </asp:Panel>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <asp:Label ID="lbSerDisCapabilities" runat="server" Text="Services Disablities Capabilities"></asp:Label></div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:Panel ID="panel2" ScrollBars="Vertical" BorderColor="Gray" BorderStyle="Solid"
                                                                BorderWidth="1px" runat="server" Width="200px" Height="100px">
                                                                <asp:CheckBoxList ID="listSerDisCapabilities" runat="server" Height="50px" Width="200px">
                                                                </asp:CheckBoxList>
                                                            </asp:Panel>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:Label ID="lbSerEthCapablities" runat="server" Text="Services Ethnicity Capablities"></asp:Label></div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:Panel ID="panel3" ScrollBars="Vertical" BorderColor="Gray" BorderStyle="Solid"
                                                                BorderWidth="1px" runat="server" Width="200px" Height="100px">
                                                                <asp:CheckBoxList ID="listSerEthCapablities" runat="server" Height="50px" Width="200px">
                                                                </asp:CheckBoxList>
                                                            </asp:Panel>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <asp:Label ID="lbSerBarCapablities" runat="server" Text="Services Barrires Capablities"></asp:Label></div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:Panel ID="panel4" ScrollBars="Vertical" BorderColor="Gray" BorderStyle="Solid"
                                                                BorderWidth="1px" runat="server" Width="200px" Height="100px">
                                                                <asp:CheckBoxList ID="listSerBarCapablities" runat="server" Height="50px" Width="200px">
                                                                </asp:CheckBoxList>
                                                            </asp:Panel>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:Label ID="lbAccreditation" runat="server" Text="Accreditation"></asp:Label></div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:Panel ID="panel5" ScrollBars="Vertical" BorderColor="Gray" BorderStyle="Solid"
                                                                BorderWidth="1px" runat="server" Width="200px" Height="100px">
                                                                <asp:CheckBoxList ID="listAccreditation" runat="server" Height="50px" Width="200px">
                                                                </asp:CheckBoxList>
                                                            </asp:Panel>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <asp:Label ID="lbSerBeneCapablities" runat="server" Text="Services Benefits Capablities"></asp:Label></div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:Panel ID="panel6" ScrollBars="Vertical" BorderColor="Gray" BorderStyle="Solid"
                                                                BorderWidth="1px" runat="server" Width="200px" Height="100px">
                                                                <asp:CheckBoxList ID="listSerBeneCapablities" runat="server" Height="50px" Width="200px">
                                                                </asp:CheckBoxList>
                                                            </asp:Panel>
                                                        </div>
                                                    </td>
                                                    <td>
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    
                                    
                                </ContentTemplate>
                                
</asp:TabPanel>
                                <asp:TabPanel ID="tabsDetail3" runat="server" HeaderText="Detail 3" Width="1180px"
                                    Visible="false">
                                    <ContentTemplate>
                                        <div>
                                            <table width="100%">
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <asp:Label ID="lbEOIProgrammes" runat="server" Text="EOI Programmes"></asp:Label></div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:Panel ID="panel7" ScrollBars="Vertical" BorderColor="Gray" BorderStyle="Solid"
                                                                BorderWidth="1px" runat="server" Width="200px" Height="100px">
                                                                <asp:CheckBoxList ID="clistEOIProgrammes" runat="server" Height="50px" Width="200px">
                                                                </asp:CheckBoxList>
                                                            </asp:Panel>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <asp:Label ID="lbEOIServices" runat="server" Text="EOI Services"></asp:Label></div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:Panel ID="panel8" ScrollBars="Vertical" BorderColor="Gray" BorderStyle="Solid"
                                                                BorderWidth="1px" runat="server" Width="200px" Height="100px">
                                                                <asp:CheckBoxList ID="clistEOIServices" runat="server" Height="50px" Width="200px">
                                                                </asp:CheckBoxList>
                                                            </asp:Panel>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    
                                    
                                </ContentTemplate>
                                
</asp:TabPanel>
                            </asp:TabContainer>
                        </div>
                        <div>
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
                        </div>
                    </div>
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td>
                    <asp:HiddenField ID="txtContactID" runat="server" />
                </td>
                <td>
                    <asp:HiddenField ID="txtAddressID" runat="server" />
                </td>
                <td>
                    <asp:HiddenField ID="txtBussinessID" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:HiddenField ID="hdfContactName" runat="server" />
                </td>
                <td>
                    <asp:HiddenField ID="hdfLine1" runat="server" />
                </td>
                <td>
                    <asp:HiddenField ID="hdfLine2" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:HiddenField ID="hdfLine3" runat="server" />
                </td>
                <td>
                    <asp:HiddenField ID="hdfPostCode" runat="server" />
                </td>
                <td>
                    <asp:HiddenField ID="hdfTown" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:HiddenField ID="hdfCounty" runat="server" />
                </td>
                <td>
                    <asp:HiddenField ID="hdfCountry" runat="server" />
                </td>
                <td>
                    <asp:HiddenField ID="hdfBussiness" runat="server" />
                </td>
                <td>
                    <asp:HiddenField ID="hdfSicCode" runat="server" />
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
